import { defineStore } from 'pinia';
import { IContact } from '@/views/contacts/contacts/data';
import { IMoment, IUser } from './types';

interface IUserStore {
  master: IUser;
  contacts: IContact[];
  moments: IMoment[];
}
const useUserStore = defineStore('user', {
  state: (): IUserStore => ({
    master: {
      username: 'Gary',
      wxId: '123435',
      avatar: '',
      area: '',
      pocketMoney: 0,
    },
    contacts: [],
    moments: [],
  }),
  persist: true,
});

export default useUserStore;
